package com.demo.entity.enums;

public enum ReadStatusEnum {

    ACTIVE("active", "进行中"),
    COMPLETED("completed", "已完成"),
    ABANDONED("abandoned","已放弃")
    ;


    private String status;
    private String desc;

    ReadStatusEnum(String status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static PostStatusEnum getByStatus(String status) {

        for (PostStatusEnum item : PostStatusEnum.values()) {
            if (item.getStatus().equals(status)) {
                return item;
            }
        }
        return null;
    }

    public String getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }
}
